<template>
    <div class="pb_a">
        <van-nav-bar class="head_nb" title="首页" @click-right="$router.push('/user');">
            <van-image src="./static/image/logo.png" slot="left" style="height:2.875rem;"/>
            <van-icon name="user-o" slot="right" size="1.4rem"/>
        </van-nav-bar>

        <van-swipe :autoplay="3000" :height="180" class="pt_a">
            <van-swipe-item>
                <img src="./image/swipe1.png" style="width:100%;">
            </van-swipe-item>
            <van-swipe-item>
                <img src="./image/swipe2.png" style="width:100%;">
            </van-swipe-item>
        </van-swipe>

        <van-grid :border="false" class="mt_10">
            <van-grid-item icon="sign" text="打卡签到"/>
            <van-grid-item icon="service-o" text="报考指南" to="guideList"/>
            <van-grid-item icon="chat-o" text="考试资讯"/>
            <van-grid-item icon="search" text="软考成绩" to="score"/>

            <van-grid-item icon="calender-o" text="每日一练" to="daily"/>
            <van-grid-item icon="edit" text="考试中心" to="center"/>
            <van-grid-item icon="notes-o" text="备考经验"/>
            <van-grid-item icon="records" text="实时公交" to="bus"/>
        </van-grid>

        <van-tabs class="mt_10">
            <van-tab title="最新资讯">
                <van-list>
                    <van-cell v-for="item in list" :key="item" :value="item"/>
                </van-list>
            </van-tab>
            <van-tab title="经验分享">
            </van-tab>
            <van-tab title="资料分享">

            </van-tab>
            <van-tab title="数据统计">

            </van-tab>
        </van-tabs>
    </div>
</template>

<script>
    import Vue from 'vue';
    import {Cell, Grid, GridItem, List, NavBar, Swipe, SwipeItem, Tab, Tabs} from 'vant';

    Vue.use(List).use(Cell);
    Vue.use(Tab).use(Tabs);
    Vue.use(Grid).use(GridItem);
    Vue.use(NavBar).use(Swipe).use(SwipeItem);

    export default {
        name: "index",
        data() {
            return {
                list: [],
                finished: false
            };
        },
        mounted() {
            for (let i = 0; i < 5; i++) {
                this.list.push('2019下半年软考成绩查询已开通（查询地址、成绩复核、合格标准）');
            }
        },
        methods: {}
    }
</script>

<style scoped>
    .van-image{
        display: inherit;
    }
</style>
